package com.freestyle.nettychat.session.service;

import com.freestyle.nettychat.session.dto.Session;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.support.collections.RedisZSet;
import org.springframework.stereotype.Service;

import javax.annotation.Nullable;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by rocklee on 2022/2/1 11:57
 */
public interface SessionService {
    Session login(String uid,String password);
    Session getSession(String uid);
    void updateSession(Session session);
    void grantChatRoom(String uid,String chatRoom);
    void logout(String uid);
    boolean removeFromChatRoom(Session session,String chatRoom);
    List<Session> getOnLineUserList(@Nullable String chatRoom);
    Map<String,String> getOnLineChatRoom();
    void createChatRoom(String chatRoom,String owner);
    void removeChatRoom(String chatRoom);

}
